package kr.salebeans.cm.domain.point;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import kr.salebeans.cm.util.DateUtils;

@Entity
@Table(name = "PO_CUSTOMER_POINT")
public class CustomerPoint implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -8029979644456111459L;

    @Id
    @GeneratedValue(generator = "SQ_PO_CUSTOMER_POINT")
    @SequenceGenerator(name = "SQ_PO_CUSTOMER_POINT", initialValue = 1, allocationSize = 1, sequenceName = "SQ_PO_CUSTOMER_POINT")
    @Column(name = "ID")
    private long id;

    @Column(name = "CUSTOMER_ID", nullable = false)
    private long customerId;

    @Column(name = "SALE_ID", nullable = false)
    private long saleId;

    @Column(name = "POINT", nullable = false)
    private long point;

    @Column(name = "REMARK")
    private String remark;

    /** 1 :  */
    @Enumerated(EnumType.STRING)
    @Column(name = "PONIT_CLS", length = 5, nullable = false)
    private PointClsType pointCls;

    @Column(name = "REG_DT_TM", nullable = false, length = 14)
    private String registerDateTime;

    public CustomerPoint() {
        this.registerDateTime = DateUtils.getCurrentBaseDateString();
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(long customerId) {
        this.customerId = customerId;
    }

    public long getSaleId() {
        return saleId;
    }

    public void setSaleId(long saleId) {
        this.saleId = saleId;
    }

    public long getPoint() {
        return point;
    }

    public void setPoint(long point) {
        this.point = point;
    }

    public PointClsType getPointCls() {
        return pointCls;
    }

    public void setPointCls(PointClsType pointCls) {
        this.pointCls = pointCls;
    }

    public String getRegisterDateTime() {
        return registerDateTime;
    }

    public void setRegisterDateTime(String registerDateTime) {
        this.registerDateTime = registerDateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

}
